define(function(require, exports){
	var $ = require('jquery');
	var pubjs = require('pubjs');
	var grid = require('@base/highGrid');
	var Base = grid.base.extend({
		init: function(config){
			config = pubjs.conf(config, {
				url: 'condition/list',
				cols: [
					{name:'_id',text:"ID", sort: true, width: 60, align: 'center'},
					{name:'Name', text: LANG("名称"), type:'index', width: 300, render:'renderName',align:'left'},
					{name:'Desc', text: LANG("条件"), render:'renderDesc',width: 600,align:'left'},
					{name:'UpdateTime', text: LANG("更新时间"), render: 'renderTime',align:'center'}
				],
				param: {
					order: '_id|-1'
				},
				hasFresh: true,
				hasSearch: true,
				hasTab: false,
				hasAmount: false,
				hasFilter: false,
				hasExport: false,
				hasSelect: true,
				reqType: 'websocket',
				gridName: 'condition'
			});
			this.Super('init', arguments);
		},
		renderName: function(i, val, row, con){
			return $('<div class="text-truncate" title="' + val + '">' + val + '</div>');
		},
		renderDesc: function(i ,val, row, con){
			return $('<div class="text-truncate"/>').attr('title', val).text(val);
		}

	});

	exports.base = Base;
});